<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title th:text="${session.title}">123</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/ace-skins.min.css}"/>
    <link th:replace="common/tip"/>
</head>
<body class="navbar-fixed">
<div th:replace="common/top"></div>
<div class="container-fluid main_bg" id="main-container">
    <a id="menu-toggler" href="#"><span></span></a>
    <div th:replace="common/menu"></div>
    <div id="main-content" class="clearfix">
        <div id="page-content" class="clearfix">
            <div th:replace="common/title"></div>
            <h3 class="header smaller lighter blue"><em class="icon-plus"></em>我要挂牌球员</h3>
            <div th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
                <div th:if="${null == qyList}" th:text="'玩家' + ${session.footUser.nike} + '还没有分配队伍或无球员'">123</div>
                <form class="form-horizontal" th:object="${footGp}" method="post" th:action="@{/hy/footGp/add}"
                      name="form" th:if="${null != qyList}">
                    <input type="hidden" name="qyId" th:field="*{qyId}" id="qyId"/>
                    <input type="hidden" name="sellUserId" th:field="*{sellUserId}"/>
                    <div class="row-fluid">
                        <div class="span8">
                            <table id="table_bug_report" class="table table-hover">
                                <thead>
                                <tr>
                                    <th style="width:40px;">位置</th>
                                    <th>球员名称</th>
                                    <th style="width:80px;">等级</th>
                                    <th class="hidden-480" style="width:110px;">国籍</th>
                                    <th class="hidden-480" style="width:40px;">年龄</th>
                                    <th class="hidden-480" style="width:40px;">评分</th>
                                    <th class="hidden-480" style="width:60px;">球员身价</th>
                                    <th class="hidden-480">球员状态</th>
                                    <th class="hidden-480">剩余场次</th>
                                    <th class="hidden-480">是否为主力球员</th>
                                    <th class="hidden-480">战斗力</th>
                                    <th class="hidden-480">战力等级</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="t:${footPersonList}">
                                    <td th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <img alt="" src="" th:src="@{/images/foot/gk.png}" th:if="${t.wzbm == 'GK'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/sw.png}" th:if="${t.wzbm == 'SW'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/cb.png}" th:if="${t.wzbm == 'CB'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/lb.png}" th:if="${t.wzbm == 'LB'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/rb.png}" th:if="${t.wzbm == 'RB'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/dmf.png}" th:if="${t.wzbm == 'DMF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/cmf.png}" th:if="${t.wzbm == 'CMF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/lmf.png}" th:if="${t.wzbm == 'LMF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/rmf.png}" th:if="${t.wzbm == 'RMF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/lwf.png}" th:if="${t.wzbm == 'LWF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/rwf.png}" th:if="${t.wzbm == 'RWF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/amf.png}" th:if="${t.wzbm == 'AMF'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/ss.png}" th:if="${t.wzbm == 'SS'}"/>
                                        <img alt="" src="" th:src="@{/images/foot/cf.png}" th:if="${t.wzbm == 'CF'}"/>
                                    </td>
                                    <td th:if="${t.qydj == '顶级球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="color: orange; font-weight: bold"
                                              th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></td>
                                    <td th:if="${t.qydj == '顶级球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                            class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                            class="icon-star text-warning"></em></td>
                                    <td th:if="${t.qydj == '超级球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="color: purple; font-weight: bold"
                                              th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></a></td>
                                    <td th:if="${t.qydj == '超级球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                            class="icon-star text-warning"></em><em class="icon-star text-warning"></em>
                                    </td>
                                    <td th:if="${t.qydj == '洲际球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="color: blue; font-weight: bold"
                                              th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></a></td>
                                    <td th:if="${t.qydj == '洲际球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                            class="icon-star text-warning"></em></td>
                                    <td th:if="${t.qydj == '普通球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="color: #9dfe5c; font-weight: bold"
                                              th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></a></td>
                                    <td th:if="${t.qydj == '普通球星'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em>
                                    </td>
                                    <td th:if="${t.qydj == '大众/白人'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="color: white; font-weight: bold"
                                              th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></a></td>
                                    <td th:if="${t.qydj == '大众/白人'}"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <em class="icon-star text-warning"></em></td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span th:if="${null != t.gjUrl}"><img th:src="@{'/' + ${t.gjUrl}}" src="" alt=""
                                                                              style="max-height:20px;"><span
                                                th:text="${t.gjName}">123</span></span>
                                        <span th:if="${null == t.gjUrl}"><img th:src="@{/images/unknow.png}" src=""
                                                                              alt="" style="max-height:20px;"><span
                                                th:text="${null == t.gjName ? '未知' : t.gjName}">123</span></span>
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${t.nl}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${t.pf}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${#numbers.formatDecimal(t.qysj, 0, 0)}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <img alt="" th:src="@{/images/foot/xy.png}" src="" style="height:20px;"
                                             th:if="${t.xycs < 10}"/>
                                        <img alt="" th:src="@{/images/foot/gp.png}" src="" style="height:20px;"
                                             th:if="${t.gpzt == 1}"/>
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${t.xycs}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${t.main ? '是' : '否'}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'"
                                        th:text="${t.power}">123
                                    </td>
                                    <td class="hidden-480"
                                        th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\',' + ${t.qysj} + ',' + ${t.fupId} + ',' + ${t.gpzt} + ')'">
                                        <span style="font-weight: bold; color: white;"
                                              th:if="${t.upTimes == 1}">1级</span>
                                        <span style="font-weight: bold; color: #9dfe5c;"
                                              th:if="${t.upTimes == 2}">2级</span>
                                        <span style="font-weight: bold; color: blue;"
                                              th:if="${t.upTimes == 3}">3级</span>
                                        <span style="font-weight: bold; color: purple;"
                                              th:if="${t.upTimes == 4}">4级</span>
                                        <span style="font-weight: bold; color: orange;"
                                              th:if="${t.upTimes == 5}">5级</span></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="span4 table_border">
                            <div class="row-fluid">
                                <h4 class="header smaller lighter blue"><em class="icon-plus"></em>挂牌球员</h4>
                            </div>
                            <div class="row-fluid">
                                <div class="span5">&nbsp;</div>
                                <div class="span2">
                                    <div class="control-group">
                                        <img th:src="@{/images/null.jpg}" src="" alt="" id="imgGp"/>
                                    </div>
                                </div>
                                <div class="span5">&nbsp;</div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="fupId">挂牌球员:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input th:field="*{fupId}" type="hidden" name="fupId" id="fupId"/>
                                            <input type="text" name="name" id="name" class="input_fix"
                                                   placeholder="挂牌球员" readonly="readonly"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('fupId')}" th:errors="*{fupId}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="gpsj">挂牌时间:</label>
                                        <div class="controls">
                                            <span id="gpsj" th:text="${#dates.format(footGp.gpsj)}">123</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('gpsj')}" th:errors="*{gpsj}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label">卖家:</label>
                                        <div class="controls" th:text="${session.footUser.nike}">123</div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('sellUserId')}"
                                          th:errors="*{sellUserId}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="ykj">一口价:</label>
                                        <div class="controls"><input th:field="*{ykj}" type="text" name="ykj" id="ykj"
                                                                     class="input_fix" placeholder="一口价"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <span style="color:red" th:if="${#fields.hasErrors('ykj')}" th:errors="*{ykj}">Name Error</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button type="submit" class="btn btn-primary" id="ok"><em class="icon-save"></em>挂牌
                                    </button>
                                    <button type="reset" class="btn btn-danger"><em class="icon-remove"></em>取消</button>
                                    <a class="btn" type="button" th:href="@{/hy/footClub/viewList}"><em
                                            class="icon-arrow-left"></em>我的球队</a>
                                    <a type="button" class="btn" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <!--/#page-content-->
        </div>
        <div th:replace="common/skin :: skin"></div>
    </div><!--/#main-content-->
</div><!--/.fluid-container#main-container-->
<div th:replace="common/js"></div>
<script>
    function changePerson(id, name, yw, zpUrl, qysj, fupId, gpzt) {
        if (gpzt === 1) {
            $("#ok").hide();
        } else {
            $("#ok").show();
        }
        $("#qyId").val(id);
        $("#fupId").val(fupId);
        $("#name").val(yw + (name === 'null' ? '' : '(' + name + ')'));
        if (zpUrl === "null") {
            $("#imgGp").attr('src', '/images/null.jpg');
        } else {
            $("#imgGp").attr('src', '/' + zpUrl);
        }
        $("#ykj").val(qysj);
    }
</script>
</body>
</html>
